home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Interfaces / MPW Interfaces / RIncludes / Types.r < prev   
Encoding:
Text File  |  1993-09-17  |  37.5 KB  |  1,095 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Types.r
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12.  
  13. #ifndef __TYPES_R__
  14. #define __TYPES_R__
  15.  
  16. #ifndef SystemSevenOrBetter
  17. #define SystemSevenOrBetter 0
  18. #endif
  19.  
  20. #ifndef SystemSevenOrLater                    /* <19> KIP - Define to 0 if it is not defined */
  21. #define SystemSevenOrLater 0
  22. #endif
  23.  
  24. /*--------------------------------------------------------------------------------------*/
  25.  
  26. #define    PixMapHeight    ( $$BitField(Bounds, 32, 16) /* bottom */            \
  27.                         - $$BitField(Bounds, 0, 16) /* top */ )
  28. #define    PixMapWidth        ( $$BitField(Bounds, 48, 16) /* right */            \
  29.                         - $$BitField(Bounds, 16, 16) /* left */ )
  30. #define    PixMapBounds    integer = $$BitField(Bounds, 0, 16) /* top */;        \
  31.                         integer = $$BitField(Bounds, 16, 16) /* left */;    \
  32.                         integer = $$BitField(Bounds, 32, 16) /* bottom */;    \
  33.                         integer = $$BitField(Bounds, 48, 16) /* right */
  34. #define    PixMapRowBytes    (((PixMapWidth * $$Word(PixelSize) + 15) / 16) * 2)
  35. #define    BitMapRowBytes    (((PixMapWidth + 15) / 16) * 2)
  36.  
  37. #define    PixMapHeightIndexed        ( $$BitField(Bounds[$$ArrayIndex(PixPatArray)], 32, 16) /* bottom */            \
  38.                                 - $$BitField(Bounds[$$ArrayIndex(PixPatArray)], 0, 16) /* top */ )
  39. #define    PixMapWidthIndexed        ( $$BitField(Bounds[$$ArrayIndex(PixPatArray)], 48, 16) /* right */            \
  40.                                 - $$BitField(Bounds[$$ArrayIndex(PixPatArray)], 16, 16) /* left */ )
  41. #define    PixMapRowBytesIndexed    (((PixMapWidthIndexed * $$Word(PixelSize[$$ArrayIndex(PixPatArray)]) + 15) / 16) * 2)
  42.  
  43.  
  44. /*-------------------------------------Equates------------------------------------------*/
  45. /*        The following are used to set styles, simply add for desired style.
  46. */
  47. #define    bold            1
  48. #define italic            2
  49. #define underline        4
  50. #define outline         8
  51. #define shadow            16
  52. #define condense        32
  53. #define extend            64
  54.  
  55. /*----------------------------acur • Cursor Pointers -----------------------------------*/
  56. type 'acur' {
  57.        integer = $$CountOf(CursIdArray); /* Nbr of cursors                 */
  58.        fill word;                        /* Next frame to show             */
  59.        array CursIdArray {
  60.            integer;                      /* 'CURS' resource id for a frame */
  61.            fill word;                    /* Pad word to make longint       */
  62.        };
  63. };
  64. #ifdef oldTemp
  65. /*--------------------------actb • Alert Color old Lookup Table--------------------------*/
  66.     type 'actb' {
  67.             unsigned hex longint;                                    /* ctSeed                */
  68.             integer;                                                /* ctFlags                */
  69.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  70.             wide array ColorSpec {
  71.                     integer        wContentColor,                        /* value                */
  72.                                 wFrameColor,
  73.                                 wTextColor,
  74.                                 wHiliteColor,
  75.                                 wTitleBarColor;
  76.                     unsigned integer;                                /* RGB:    red                */
  77.                     unsigned integer;                                /*        green            */
  78.                     unsigned integer;                                /*        blue            */
  79.             };
  80.     };
  81. #else
  82. /*----------------------------actb • Alert Color Lookup Table----------------------------*/
  83.     type 'actb' {
  84.             unsigned hex longint = 0;                                /* ctSeed                */
  85.             integer = 0;                                            /* ctFlags                */
  86.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  87.             wide array ColorSpec {
  88.                     integer        wContentColor,                        /* value                */
  89.                                 wFrameColor,
  90.                                 wTextColor,
  91.                                 wHiliteColor,
  92.                                 wTitleBarColor,
  93.                                 wHiliteLight,
  94.                                 wHiliteDark,
  95.                                 wTitleBarLight,
  96.                                 wTitleBarDark,
  97.                                 wDialogLight,
  98.                                 wDialogDark,
  99.                                 wTingeLight,
  100.                                 wTingeDark;
  101.                     unsigned integer;                                /* RGB:    red                */
  102.                     unsigned integer;                                /*        green            */
  103.                     unsigned integer;                                /*        blue            */
  104.             };
  105.     };
  106. #endif
  107. /*----------------------------ALRT • Alert Template-------------------------------------*/
  108. type 'ALRT' {
  109.         rect;                                                    /* boundsRect            */
  110.         integer;                                                /* 'DITL' ID            */
  111.  
  112.         /* NOTE: the stages are ordered 4, 3, 2, 1 */
  113.         wide array [4] {
  114.                 boolean                 OK, Cancel;             /* Bold Outline         */
  115.                 boolean                 invisible, visible;     /* Draw Alert            */
  116.                 unsigned bitstring[2]    silent = 0
  117.                                 sound1, sound2, sound3;         /* Beeps                */
  118.         };
  119.  
  120.     /*    The following are window positioning options ,usable in 7.0    */
  121. #if SystemSevenOrLater
  122.         unsigned integer                noAutoCenter = 0x0000,
  123.                                         centerMainScreen = 0x280a,
  124.                                         alertPositionMainScreen = 0x300a,
  125.                                         staggerMainScreen = 0x380a,
  126.                                         centerParentWindow = 0xa80a,
  127.                                         alertPositionParentWindow = 0xb00a,
  128.                                         staggerParentWindow = 0xb80a,
  129.                                         centerParentWindowScreen = 0x680a,
  130.                                         alertPositionParentWindowScreen = 0x700a,
  131.                                         staggerParentWindowScreen = 0x780a;
  132. #endif
  133. };
  134. /*----------------------------BNDL • Bundle---------------------------------------------*/
  135. type 'BNDL' {
  136.         literal longint;                                        /* Signature            */
  137.         integer;                                                /* Version ID            */
  138.         integer = $$CountOf(TypeArray) - 1;
  139.         array TypeArray {
  140.                 literal longint;                                /* Type                 */
  141.                 integer = $$CountOf(IDArray) - 1;
  142.                 wide array IDArray {
  143.                         integer;                                /* Local ID             */
  144.                         integer;                                /* Actual ID            */
  145.                 };
  146.         };
  147. };
  148. #ifdef oldTemp
  149. /*--------------------------cctb • Control Color old Lookup Table----------------------*/
  150.     type 'cctb' {
  151.             unsigned hex longint;                                    /* CCSeed                */
  152.             integer;                                                /* ccReserved            */
  153.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  154.             wide array ColorSpec {
  155.                     integer        cFrameColor,                        /* partcode                */
  156.                                 cBodyColor,
  157.                                 cTextColor,
  158.                                 cElevatorColor;
  159.                     unsigned integer;                                /* RGB:    red                */
  160.                     unsigned integer;                                /*        green            */
  161.                     unsigned integer;                                /*        blue            */
  162.             };
  163.     };
  164. #else
  165. /*----------------------------cctb • Control Color Lookup Table-------------------------*/
  166.     type 'cctb' {
  167.             unsigned hex longint = 0;                                /* CCSeed                */
  168.             integer = 0;                                            /* ccReserved            */
  169.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  170.             wide array ColorSpec {
  171.                     integer        cFrameColor,                        /* partcode                */
  172.                                 cBodyColor,
  173.                                 cTextColor,
  174.                                 cElevatorColor,
  175.                                 cFillPatColor,
  176.                                 cArrowsLight,
  177.                                 cArrowsDark,
  178.                                 cThumbLight,
  179.                                 cThumbDark,
  180.                                 cHiliteLight,
  181.                                 cHiliteDark,
  182.                                 cTitleBarLight,
  183.                                 cTitleBarDark,
  184.                                 cTingeLight,
  185.                                 cTingeDark;
  186.                     unsigned integer;                                /* RGB:    red                */
  187.                     unsigned integer;                                /*        green            */
  188.                     unsigned integer;                                /*        blue            */
  189.             };
  190.     };
  191. #endif
  192. #ifdef oldTemp
  193. /*-----------------------cicn • Color Icon old template-------------------------------------*/
  194.     type 'cicn' {
  195.             /* IconPMap (pixMap) record */
  196.             fill long;                                                /* Base address            */
  197.             unsigned bitstring[1] = 1;                                /* New pixMap flag        */
  198.             unsigned bitstring[2] = 0;                                /* Must be 0            */
  199.     pMapRowBytes:
  200.             unsigned bitstring[13];                                    /* Offset to next row    */
  201.     Bounds:
  202.             rect;                                                    /* Bitmap bounds        */
  203.             integer;                                                /* pixMap vers number    */
  204.             integer    unpacked;                                        /* Packing format        */
  205.             unsigned longint;                                        /* Size of pixel data    */
  206.             unsigned hex longint;                                    /* h. resolution (ppi) (fixed) */
  207.             unsigned hex longint;                                    /* v. resolution (ppi) (fixed) */
  208.             integer            chunky, chunkyPlanar, planar;            /* Pixel storage format    */
  209.             integer;                                                /* # bits in pixel        */
  210.             integer;                                                /* # components in pixel*/
  211.             integer;                                                /* # bits per field        */
  212.             unsigned longint;                                        /* Offset to next plane    */
  213.             unsigned longint;                                        /* Offset to color table*/
  214.             fill long;                                                /* Reserved                */
  215.  
  216.             /* IconMask (bitMap) record */
  217.             fill long;                                                /* Base address            */
  218.     maskRowBytes:
  219.             integer;                                                /* Row bytes            */
  220.             rect;                                                    /* Bitmap bounds        */
  221.  
  222.             /* IconBMap (bitMap) record */
  223.             fill long;                                                /* Base address            */
  224.     iconBMapRowBytes:
  225.             integer;                                                /* Row bytes            */
  226.             rect;                                                    /* Bitmap bounds        */
  227.  
  228.             fill long;                                                /* Handle placeholder    */
  229.  
  230.             /* Mask data */
  231.             hex string [$$Word(maskRowBytes) * PIXMAPHEIGHT];
  232.  
  233.             /* BitMap data */
  234.             hex string [$$Word(iconBMapRowBytes) * PIXMAPHEIGHT];
  235.  
  236.             /* Color Table */
  237.             unsigned hex longint;                                    /* ctSeed                */
  238.             integer;                                                /* ctFlags                */
  239.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  240.             wide array ColorSpec {
  241.                     integer;                                        /* value                */
  242.                     unsigned integer;                                /* RGB:    red                */
  243.                     unsigned integer;                                /*        green            */
  244.                     unsigned integer;                                /*        blue            */
  245.             };
  246.  
  247.             /* PixelMap data */
  248.             hex string [$$BitField(pMapRowBytes, 0, 13) * PIXMAPHEIGHT];
  249.     };
  250. #else
  251. /*----------------------------cicn • Color Icon-----------------------------------------*/
  252.     type 'cicn' {
  253.             /* IconPMap (pixMap) record */
  254.             fill long;                                                /* Base address            */
  255.             unsigned bitstring[1] = 1;                                /* New pixMap flag        */
  256.             unsigned bitstring[2] = 0;                                /* Must be 0            */
  257.             unsigned bitstring[13] = PixMapRowBytes;                                    /* Offset to next row    */
  258.     Bounds:    rect;                                                    /* Bitmap bounds        */
  259.             integer = 0;                                            /* pixMap vers number    */
  260.             integer = 0;                                            /* Packing format        */
  261.             fill long;                                                /* Size of pixel data    */
  262.             unsigned hex longint = $00480000;                        /* h. resolution (ppi)  */
  263.             unsigned hex longint = $00480000;                        /* v. resolution (ppi)  */
  264.             integer = 0 /* chunky */;                                /* Pixel storage format    */
  265.     PixelSize:
  266.             integer;                                                /* # bits in pixel        */
  267.             integer = 1;                                            /* # components in pixel*/
  268.             integer = $$Word(PixelSize);                            /* # bits per field        */
  269.             fill long;
  270.             fill long;
  271.             fill long;
  272.  
  273.             /* IconMask (bitMap) record */
  274.             fill long;                                                /* Base address            */
  275.             integer = BitMapRowBytes;                                /* Row bytes            */
  276.             PixMapBounds;                                            /* Bitmap bounds        */
  277.  
  278.             /* IconBMap (bitMap) record */
  279.             fill long;                                                /* Base address            */
  280.             integer = BitMapRowBytes;                                /* Row bytes            */
  281.             PixMapBounds;                                            /* Bitmap bounds        */
  282.  
  283.             fill long;                                                /* Handle placeholder    */
  284.  
  285.             /* Mask data */
  286.             hex string [BitMapRowBytes * PixMapHeight];
  287.  
  288.             /* BitMap data */
  289.             hex string [BitMapRowBytes * PixMapHeight];
  290.  
  291.     ColorTable:
  292.             unsigned hex longint = 0;                                /* ctSeed                */
  293.             integer = 0;                                            /* ctFlags                */
  294.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  295.             wide array ColorSpec {
  296.                     integer = $$ArrayIndex(ColorSpec) - 1;            /* value                */
  297.                     unsigned integer;                                /* RGB:    red                */
  298.                     unsigned integer;                                /*        green            */
  299.                     unsigned integer;                                /*        blue            */
  300.             };
  301.  
  302.     PixelData:
  303.             hex string [PixMapRowBytes * PixMapHeight];                /* more of the pixmap    */
  304.     };
  305. #endif
  306. #ifdef oldTemp
  307. /*-------------------------- old clut • Generic Color Lookup Table----------------------*/
  308.     type 'clut' {
  309.             unsigned hex longint;                                    /* ctSeed                */
  310.             integer;                                                /* ctFlags                */
  311.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  312.             wide array ColorSpec {
  313.                     integer;                                        /* value                */
  314.                     unsigned integer;                                /* RGB:    red                */
  315.                     unsigned integer;                                /*        green            */
  316.                     unsigned integer;                                /*        blue            */
  317.             };
  318.     };
  319. #else
  320. /*----------------------------clut • Generic Color Lookup Table-------------------------*/
  321.     type 'clut' {
  322.             unsigned hex longint = 0;                                /* ctSeed                */
  323.             integer = 0;                                            /* ctFlags                */
  324.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  325.             wide array ColorSpec {
  326.                     integer = $$ArrayIndex(ColorSpec) - 1;            /* value                */
  327.                     unsigned integer;                                /* RGB:    red                */
  328.                     unsigned integer;                                /*        green            */
  329.                     unsigned integer;                                /*        blue            */
  330.             };
  331.     };
  332. #endif
  333. /*----------------------------CNTL • Control Template-----------------------------------*/
  334. type 'CNTL' {
  335.         rect;                                                    /* Bounds                */
  336.         integer;                                                /* Value                */
  337.         byte            invisible, visible;                     /* visible                */
  338.         fill byte;
  339.         integer;                                                /* Max                    */
  340.         integer;                                                /* Min                    */
  341.         integer         pushButProc,                            /* ProcID                */
  342.                         checkBoxProc,
  343.                         radioButProc,
  344.                         pushButProcUseWFont = 8,
  345.                         checkBoxProcUseWFont,
  346.                         radioButProcUseWFont,
  347.                         scrollBarProc = 16;
  348.         longint;                                                /* RefCon                */
  349.         pstring;                                                /* Title                */
  350. };
  351.  
  352. #define    popupMenuCDEFproc        1008                            /* ProcID 1008 = 16 * 63        */
  353.  
  354. /* popup CDEF variation codes */
  355. #define    popupFixedWidth            0x0001
  356. #define    popupReserved            0x0002
  357. #define    popupUseAddResMenu        0x0004
  358. #define    popupUseWFont            0x0008
  359.  
  360. /* popup CDEF label characteristics */
  361. #define    popupTitleBold            0x0100
  362. #define    popupTitleItalic        0x0200
  363. #define    popupTitleUnderline        0x0400
  364. #define    popupTitleOutline        0x0800
  365. #define    popupTitleShadow        0x1000
  366. #define    popupTitleCondense        0x2000
  367. #define    popupTitleExtend        0x4000
  368. #define popupTitleNoStyle        0x8000
  369.  
  370. #define    popupTitleLeftJust        0x0000
  371. #define    popupTitleCenterJust    0x0001
  372. #define    popupTitleRightJust        0x00FF
  373.  
  374. #ifdef oldTemp
  375. /*------------------------crsr • old Color Cursor template----------------------------------*/
  376.     type 'crsr' {
  377.             /* CCrsr record */
  378.             hex unsigned integer    oldCursor   = $8000,            /* Type of cursor        */
  379.                                     colorCursor = $8001;
  380.             unsigned longint = pixMap / 8;                            /* Offset to pixMap        */
  381.             unsigned longint = pixelData / 8;                        /* Offset to pixel data    */
  382.             fill long;                                                /* Expanded cursor data    */
  383.             fill word;                                                /* Expanded data depth    */
  384.             fill long;                                                /* Reserved                */
  385.             hex string [32];                                        /* One bit cursor data    */
  386.             hex string [32];                                        /* One bit cursor mask    */
  387.             point;                                                    /* Hot spot             */
  388.             fill long;                                                /* Table id                */
  389.             fill long;                                                /* id for cursor        */
  390.  
  391.             /* IconPMap (pixMap) record */
  392.     pixMap:
  393.             fill long;                                                /* Base address            */
  394.             unsigned bitstring[1] = 1;                                /* New pixMap flag        */
  395.             unsigned bitstring[2] = 0;                                /* Must be 0            */
  396.             unsigned bitstring[13];                                    /* Offset to next row    */
  397.             rect;                                                    /* Bitmap bounds        */
  398.             integer;                                                /* pixMap version number*/
  399.             integer    unpacked;                                        /* Packing format        */
  400.             unsigned longint;                                        /* Size of pixel data    */
  401.             unsigned hex longint;                                    /* h. resolution (ppi) (fixed) */
  402.             unsigned hex longint;                                    /* v. resolution (ppi) (fixed) */
  403.             integer            chunky, chunkyPlanar, planar;            /* Pixel storage format    */
  404.             integer;                                                /* # bits in pixel        */
  405.             integer;                                                /* # components in pixel*/
  406.             integer;                                                /* # bits per field        */
  407.             unsigned longint;                                        /* Offset to next plane    */
  408.             unsigned longint = colorTable / 8;                        /* Offset to color table*/
  409.             fill long;                                                /* Reserved                */
  410.  
  411.     pixelData:
  412.             hex string [(colorTable - pixelData) / 8];                /* Pixel data            */
  413.  
  414.             /* Color Table */
  415.     colorTable:
  416.             unsigned hex longint;                                    /* ctSeed                */
  417.             integer;                                                /* ctFlags                */
  418.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  419.             wide array ColorSpec {
  420.                     integer;                                        /* value                */
  421.                     unsigned integer;                                /* RGB:    red                */
  422.                     unsigned integer;                                /*        green            */
  423.                     unsigned integer;                                /*        blue            */
  424.             };
  425.     };
  426. #else
  427. /*----------------------------crsr • Color Cursor---------------------------------------*/
  428.     type 'crsr' {
  429.             /* CCrsr record */
  430.             unsigned hex integer = $8001;                            /* Type of cursor        */
  431.             unsigned longint = PixMap / 8;                            /* Offset to pixMap        */
  432.             unsigned longint = PixelData / 8;                        /* Offset to pixel data    */
  433.             fill long;                                                /* Expanded cursor data    */
  434.             fill word;                                                /* Expanded data depth    */
  435.             fill long;                                                /* Reserved                */
  436.             hex string [32];                                        /* One bit cursor data    */
  437.             hex string [32];                                        /* One bit cursor mask    */
  438.             point;                                                    /* Hot spot             */
  439.             fill long;                                                /* Table id                */
  440.             fill long;                                                /* id for cursor        */
  441.  
  442.             /* PixMap record */
  443.     PixMap:
  444.             fill long;                                                /* Base address            */
  445.             unsigned bitstring[1] = 1;                                /* New pixMap flag        */
  446.             unsigned bitstring[2] = 0;                                /* Must be 0            */
  447.             unsigned bitstring[13] = PixMapRowBytes;                /* Offset to next row    */
  448.  
  449.     Bounds:    rect = { 0, 0, 16, 16 };                                /* Bitmap bounds        */
  450.             integer = 0;                                            /* pixMap vers number    */
  451.             integer = 0;                                            /* Packing format        */
  452.             fill long;                                                /* Size of pixel data    */
  453.             unsigned hex longint = $00480000;                        /* h. resolution (ppi)  */
  454.             unsigned hex longint = $00480000;                        /* v. resolution (ppi)  */
  455.             integer = 0 /* chunky */;                                /* Pixel storage format    */
  456.     PixelSize:
  457.             integer;                                                /* # bits in pixel        */
  458.             integer = 1;                                            /* # components in pixel*/
  459.             integer = $$Word(PixelSize);                            /* # bits per field        */
  460.             fill long;
  461.             unsigned longint = ColorTable / 8;
  462.             fill long;
  463.  
  464.     PixelData:
  465.             hex string [PixMapRowBytes * PixMapHeight];
  466.  
  467.     ColorTable:
  468.             unsigned hex longint = 0;                                /* ctSeed                */
  469.             integer = 0;                                            /* ctFlags                */
  470.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  471.             wide array ColorSpec {
  472.                     integer;                                        /* value                */
  473.                     unsigned integer;                                /* RGB:    red                */
  474.                     unsigned integer;                                /*        green            */
  475.                     unsigned integer;                                /*        blue            */
  476.             };
  477.     };
  478. #endif
  479. /*----------------------------CURS • Cursor---------------------------------------------*/
  480. type 'CURS' {
  481.         hex string [32];                                        /* Data                 */
  482.         hex string [32];                                        /* Mask                 */
  483.         point;                                                    /* Hot spot             */
  484. };
  485. /*----------------------------dctb • Dialog Color Lookup Table--------------------------*/
  486. type 'dctb' as 'actb';
  487. /*----------------------------DITL • Dialog Item List-----------------------------------*/
  488. type 'DITL' {
  489.         integer = $$CountOf(DITLarray) - 1;                     /* Array size            */
  490.         wide array DITLarray {
  491.                 fill long;
  492.                 rect;                                            /* Item bounds            */
  493.                 switch {
  494.  
  495.                 case HelpItem:                                    /* Help Mgr type item */
  496.                         boolean         enabled,disabled;        /* Enable flag            */
  497.                         key bitstring[7] = 1;                    /* this is a new type = 1 */
  498.  
  499.                         switch {
  500.                             case HMScanhdlg:
  501.                                 byte = 4;                        /* sizeola                */
  502.                                 key int = 1;                    /* key value             */
  503.                                 integer;                        /* resource ID            */
  504.  
  505.                             case HMScanhrct:
  506.                                 byte = 4;                        /* sizeola                */
  507.                                 key int = 2;                    /* key value             */
  508.                                 integer;                        /* resource ID            */
  509.  
  510.                             case HMScanAppendhdlg:
  511.                                 byte = 6;                        /* sizeola                */
  512.                                 key int = 8;                    /* key value             */
  513.                                 integer;                        /* resource ID            */
  514.                                 integer;                        /* offset (zero based)    */
  515.                         };
  516.                 case Button:
  517.                         boolean         enabled,disabled;        /* Enable flag            */
  518.                         key bitstring[7] = 4;
  519.                         pstring;                                /* Title                */
  520.  
  521.                 case CheckBox:
  522.                         boolean         enabled,disabled;        /* Enable flag            */
  523.                         key bitstring[7] = 5;
  524.                         pstring;                                /* Title                */
  525.  
  526.                 case RadioButton:
  527.                         boolean         enabled,disabled;        /* Enable flag            */
  528.                         key bitstring[7] = 6;
  529.                         pstring;                                /* Title                */
  530.  
  531.                 case Control:
  532.                         boolean         enabled,disabled;        /* Enable flag            */
  533.                         key bitstring[7] = 7;
  534.                         byte = 2;
  535.                         integer;                                /* 'CTRL' ID            */
  536.  
  537.                 case StaticText:
  538.                         boolean         enabled,disabled;        /* Enable flag            */
  539.                         key bitstring[7] = 8;
  540.                         pstring;                                /* Text                 */
  541.  
  542.                 case EditText:
  543.                         boolean         enabled,disabled;        /* Enable flag            */
  544.                         key bitstring[7] = 16;
  545.                         pstring;                                /* Text                 */
  546.  
  547.                 case Icon:
  548.                         boolean         enabled,disabled;        /* Enable flag            */
  549.                         key bitstring[7] = 32;
  550.                         byte = 2;
  551.                         integer;                                /* 'ICON' ID            */
  552.  
  553.                 case Picture:
  554.                         boolean         enabled,disabled;        /* Enable flag            */
  555.                         key bitstring[7] = 64;
  556.                         byte = 2;
  557.                         integer;                                /* 'PICT' ID            */
  558.  
  559.                 case UserItem:
  560.                         boolean         enabled,disabled;        /* Enable flag            */
  561.                         key bitstring[7] = 0;
  562.                         byte = 0;
  563.                 };
  564.                 align word;
  565.         };
  566. };
  567. /*----------------------------DLOG • Dialog Template------------------------------------*/
  568. type 'DLOG' {
  569.         rect;                                                    /* boundsRect            */
  570.         integer         documentProc,                            /* procID                */
  571.                         dBoxProc,
  572.                         plainDBox,
  573.                         altDBoxProc,
  574.                         noGrowDocProc,
  575.                         movableDBoxProc,
  576.                         zoomDocProc = 8,
  577.                         zoomNoGrow = 12,
  578.                         rDocProc = 16;
  579.         byte            invisible, visible;                     /* visible                */
  580.         fill byte;
  581.         byte            noGoAway, goAway;                        /* goAway                */
  582.         fill byte;
  583.         unsigned hex longint;                                    /* refCon                */
  584.         integer;                                                /* 'DITL' ID            */
  585.         pstring;                                                /* title                */
  586.     /*    The following are window positioning options ,usable in 7.0    */
  587. #if SystemSevenOrLater
  588.         align word;
  589.         unsigned integer                noAutoCenter = 0x0000,
  590.                                         centerMainScreen = 0x280a,
  591.                                         alertPositionMainScreen = 0x300a,
  592.                                         staggerMainScreen = 0x380a,
  593.                                         centerParentWindow = 0xa80a,
  594.                                         alertPositionParentWindow = 0xb00a,
  595.                                         staggerParentWindow = 0xb80a,
  596.                                         centerParentWindowScreen = 0x680a,
  597.                                         alertPositionParentWindowScreen = 0x700a,
  598.                                         staggerParentWindowScreen = 0x780a;
  599. #endif
  600. };
  601. /*----------------------------------------eppc -----------------------------------------*/
  602. type 'eppc' {
  603.     unsigned longint;    /* flags word    */
  604.     unsigned longint;    /* reserved     */
  605.     unsigned integer;    /* scriptCode    */
  606.     pstring[32];
  607. };
  608. /*----------------------------fctb • Font Color Lookup Table----------------------------*/
  609. type 'fctb' as 'clut';
  610. /*----------------------------FREF • File Reference-------------------------------------*/
  611. type 'FREF' {
  612.         literal longint;                                        /* File Type            */
  613.         integer;                                                /* Icon ID                */
  614.         pstring;                                                /* Filename             */
  615. };
  616. /*----------------------------ICON • Icon-----------------------------------------------*/
  617. type 'ICON' {
  618.         hex string[128];                                        /* Icon data            */
  619. };
  620. /*----------------------------ICN# • Icon List------------------------------------------*/
  621. type 'ICN#' {
  622.         array {
  623.                 hex string[128];                                /* Icon data            */
  624.         };
  625. };
  626. type 'KCN#' as 'ICN#';                                            /* Keyboard Icon data <8>*/
  627. /*----------------------------MENU • Menu-----------------------------------------------*/
  628. type 'MENU' {
  629.         integer;                                                /* Menu ID                */
  630.         fill word[2];
  631.         integer         textMenuProc = 0;                        /* ID of menu def proc    */
  632.         fill word;
  633.         unsigned hex bitstring[31]
  634.                         allEnabled = 0x7FFFFFFF;                /* Enable flags         */
  635.         boolean         disabled, enabled;                        /* Menu enable            */
  636.         pstring         apple = "\0x14";                        /* Menu Title            */
  637.         wide array {
  638.                 pstring;                                        /* Item title            */
  639.                 byte            noIcon;                         /* Icon number            */
  640.                 char            noKey = "\0x00",                /* Key equivalent or    */
  641.                                 hierarchicalMenu = "\0x1B";        /* hierarchical menu    */
  642.                 char            noMark = "\0x00",                /* Marking char or id    */
  643.                                 check = "\0x12";                /* of hierarchical menu    */
  644.                 fill bit;
  645.                 unsigned bitstring[7]
  646.                                 plain;                            /* Style                */
  647.         };
  648.         byte = 0;
  649. };
  650. /*----------------------------MBAR • Menu Bar-------------------------------------------*/
  651. type 'MBAR' {
  652.         integer = $$CountOf(MenuArray);                         /* Number of menus        */
  653.         wide array MenuArray{
  654.                 integer;                                        /* Menu resource ID     */
  655.         };
  656. };
  657. /*----------------------------mctb • Menu Color Lookup Table----------------------------*/
  658. type 'mctb' {
  659.         integer = $$CountOf(MCTBArray);                         /* Color table count    */
  660.         wide array MCTBArray {
  661.             integer                mctbLast = -99;                    /* Menu resource ID     */
  662.             integer;                                            /* Menu Item             */
  663.             wide array [4] {
  664.                     unsigned integer;                            /* RGB: red                */
  665.                     unsigned integer;                            /*        green            */
  666.                     unsigned integer;                            /*        blue            */
  667.             };
  668.             fill word;                                            /* Reserved word        */
  669.         };
  670. };
  671. /*----------------------------PAT  • Quickdraw Pattern----------------------------------*/
  672. type 'PAT ' {
  673.         hex string[8];                                            /* Pattern                */
  674. };
  675. /*----------------------------PAT# • Quickdraw Pattern List-----------------------------*/
  676. type 'PAT#' {
  677.         integer = $$Countof(PatArray);
  678.         array PatArray {
  679.                 hex string[8];                                    /* Pattern                */
  680.         };
  681. };
  682. #ifndef __PICT_R__
  683. /*----------------------------PICT • Quickdraw Picture----------------------------------*/
  684. type 'PICT' {
  685.         unsigned integer;                                        /* Length                */
  686.         rect;                                                    /* Frame                */
  687.         hex string;                                             /* Data                 */
  688. };
  689. #endif __PICT_R__
  690. /*----------------------------pltt • Color Palette--------------------------------------*/
  691. type 'pltt' {
  692.         integer = $$CountOf(ColorInfo);                         /* Color table count    */
  693.         fill long;                                                /* Reserved                */
  694.         fill word;                                                /* Reserved                */
  695.         fill long;                                                /* Reserved                */
  696.         fill long;                                                /* Reserved                */
  697.         wide array ColorInfo {
  698.             unsigned integer;                                    /* RGB: red                */
  699.             unsigned integer;                                    /*        green            */
  700.             unsigned integer;                                    /*         blue            */
  701.             integer        pmCourteous, pmDithered, pmTolerant,    /* Color usage            */
  702.                         pmAnimated = 4, pmExplicit = 8;
  703.             integer;                                            /* Tolerance value        */
  704.             fill word;                                            /* Private flags        */
  705.             fill long;                                            /* Private                */
  706.         };
  707. };
  708. #ifdef oldTemp
  709. /*------------------------ppat • Pixel Pattern old template---------------------------------*/
  710.     type 'ppat' {
  711.             /* PixPat record */
  712.             integer        oldPattern,                                    /* Pattern type            */
  713.                         newPattern,
  714.                         ditherPattern;
  715.             unsigned longint = PixMap / 8;                            /* Offset to pixmap        */
  716.             unsigned longint = PixelData / 8;                        /* Offset to data        */
  717.             fill long;                                                /* Expanded pixel image    */
  718.             fill word;                                                /* Pattern valid flag    */
  719.             fill long;                                                /* expanded pattern        */
  720.             hex string [8];                                            /* old-style pattern    */
  721.  
  722.             /* PixMap record */
  723.     PixMap:
  724.             fill long;                                                /* Base address            */
  725.             unsigned bitstring[1] = 1;                                /* New pixMap flag        */
  726.             unsigned bitstring[2] = 0;                                /* Must be 0            */
  727.             unsigned bitstring[13];                                    /* Offset to next row    */
  728.             rect;                                                    /* Bitmap bounds        */
  729.             integer;                                                /* pixMap vers number    */
  730.             integer        unpacked;                                    /* Packing format        */
  731.             unsigned longint;                                        /* size of pixel data    */
  732.             unsigned hex longint;                                    /* h. resolution (ppi) (fixed) */
  733.             unsigned hex longint;                                    /* v. resolution (ppi) (fixed) */
  734.             integer            chunky, chunkyPlanar, planar;            /* Pixel storage format    */
  735.             integer;                                                /* # bits in pixel        */
  736.             integer;                                                /* # components in pixel*/
  737.             integer;                                                /* # bits per field        */
  738.             unsigned longint;                                        /* Offset to next plane    */
  739.             unsigned longint = ColorTable / 8;                        /* Offset to color table*/
  740.             fill long;                                                /* Reserved                */
  741.  
  742.     PixelData:
  743.             hex string [(ColorTable - PixelData) / 8];
  744.  
  745.     ColorTable:
  746.             unsigned hex longint;                                    /* ctSeed                */
  747.             integer;                                                /* ctFlags                */
  748.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  749.             wide array ColorSpec {
  750.                     integer;                                        /* value                */
  751.                     unsigned integer;                                /* RGB:    red                */
  752.                     unsigned integer;                                /*        green            */
  753.                     unsigned integer;                                /*        blue            */
  754.             };
  755.     };
  756. #else
  757. /*----------------------------ppat • Pixel Pattern--------------------------------------*/
  758.     type 'ppat' {
  759.             /* PixPat record */
  760.             integer = 1 /* newPattern */;                            /* Pattern type            */
  761.             unsigned longint = PixMap / 8;                            /* Offset to pixmap        */
  762.             unsigned longint = PixelData / 8;                        /* Offset to data        */
  763.             fill long;                                                /* Expanded pixel image    */
  764.             fill word;                                                /* Pattern valid flag    */
  765.             fill long;                                                /* expanded pattern        */
  766.             hex string [8];                                            /* old-style pattern    */
  767.  
  768.             /* PixMap record */
  769.     PixMap:
  770.             fill long;                                                /* Base address            */
  771.             unsigned bitstring[1] = 1;                                /* New pixMap flag        */
  772.             unsigned bitstring[2] = 0;                                /* Must be 0            */
  773.             unsigned bitstring[13] = PixMapRowBytes;                /* Offset to next row    */
  774.     Bounds:    rect;                                                    /* Bitmap bounds        */
  775.             integer = 0;                                            /* pixMap vers number    */
  776.             integer = 0;                                            /* Packing format        */
  777.             fill long;                                                /* Size of pixel data    */
  778.             unsigned hex longint = $00480000;                        /* h. resolution (ppi)  */
  779.             unsigned hex longint = $00480000;                        /* v. resolution (ppi)  */
  780.             integer = 0 /* chunky */;                                /* Pixel storage format    */
  781.     PixelSize:
  782.             integer;                                                /* # bits in pixel        */
  783.             integer = 1;                                            /* # components in pixel*/
  784.             integer = $$Word(PixelSize);                            /* # bits per field        */
  785.             fill long;
  786.             unsigned longint = ColorTable / 8;
  787.             fill long;
  788.  
  789.     PixelData:
  790.             hex string [PixMapRowBytes * PixMapHeight];
  791.  
  792.     ColorTable:
  793.             unsigned hex longint = 0;                                /* ctSeed                */
  794.             integer = 0;                                            /* ctFlags                */
  795.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  796.             wide array ColorSpec {
  797.                     integer = $$ArrayIndex(ColorSpec) - 1;            /* value                */
  798.                     unsigned integer;                                /* RGB:    red                */
  799.                     unsigned integer;                                /*        green            */
  800.                     unsigned integer;                                /*        blue            */
  801.             };
  802.     };
  803. #endif
  804. /*----------------------------SICN • Small Icon-----------------------------------------*/
  805. type 'SICN' {
  806.         array {
  807.                 hex string[32];                                 /* SICN data            */
  808.         };
  809. };
  810. /*----------------------------SIZE • MultiFinder Size Information-----------------------*/
  811. #define    ignoreAppDiedEvents            ignoreChildDiedEvents
  812. #define    acceptAppDiedEvents            acceptChildDiedEvents
  813. #define    needsActivateOnFGSwitch        notMultiFinderAware            /* for compatibility    */
  814. #define    doesActivateOnFGSwitch        multiFinderAware            /* for compatibility    */
  815. #define    dontSaveScreen                reserved                    /* for compatibility    */
  816. #define    saveScreen                    true                        /* for compatibility    */
  817. #define    enableOptionSwitch            reserved                    /* for compatibility    */
  818. #define    disableOptionSwitch            true                        /* for compatibility    */
  819.  
  820. type 'SIZE' {
  821.         boolean                    reserved;
  822.         boolean                 ignoreSuspendResumeEvents,        /* suspend-resume        */
  823.                                 acceptSuspendResumeEvents;
  824.         boolean                    reserved;
  825.         boolean                    cannotBackground,
  826.                                 canBackground;                    /* Can properly use back-
  827.                                                                    ground null events    */
  828.         boolean                    needsActivateOnFGSwitch,        /* activate/deactivate    */
  829.                                 doesActivateOnFGSwitch;            /* on resume/suspend    */
  830.         boolean                    backgroundAndForeground,        /* Application does not    */
  831.                                 onlyBackground;                    /* have a user interface*/
  832.         boolean                    dontGetFrontClicks,                /* Get mouse down/up    */
  833.                                 getFrontClicks;                    /* when suspended        */
  834.         boolean                    ignoreAppDiedEvents,            /* Apps use this.        */
  835.                                 acceptAppDiedEvents;            /* Debuggers use this.    */
  836.         boolean                    not32BitCompatible,                /* Works with 24bit addr*/
  837.                                 is32BitCompatible;                /* Works with 24 or 32    */
  838.                                                                 /* bit addresses        */
  839. /* next four bits are new for system 7.0 */
  840.         boolean                    notHighLevelEventAware,
  841.                                 isHighLevelEventAware;            /* does Post/AcceptHighLevelEvent */
  842.         boolean                    onlyLocalHLEvents,                /* paranoid users' flag */
  843.                                 localAndRemoteHLEvents;
  844.         boolean                    notStationeryAware,                /* checks stationery bit */
  845.                                 isStationeryAware;                /* when opening documents */
  846.         boolean                    dontUseTextEditServices,        /* can use text services */
  847.                                 useTextEditServices;            /* through TextEdit.     */
  848.  
  849. #undef reserved
  850.         boolean                    reserved;                        /* These 3 bits are     */
  851.         boolean                    reserved;                        /* reserved.  Set them    */
  852.         boolean                    reserved;                        /* to "reserved". When    */
  853.                                                                 /* we decide to define    */
  854.                                                                 /* a new flag, your        */
  855.                                                                 /* old resource will     */
  856.                                                                 /* still compile.        */
  857.  
  858.         /* Memory sizes are in bytes */
  859.         unsigned longint;                                        /* preferred mem size    */
  860.         unsigned longint;                                        /* minimum mem size        */
  861.  
  862.         // If we ever define one of the four reserved bits above, the "reserved"
  863.         // enumeration wouldn't appear on the newly defined bit.  By defining "reserved"
  864.         // below, old resource SIZE declarations will still compile.
  865. #define    reserved        false
  866. };
  867. /*----------------------------STR  • Pascal-Style String--------------------------------*/
  868. type 'STR ' {
  869.         pstring;                                                /* String                */
  870. };
  871. /*----------------------------STR# • Pascal-Style String List---------------------------*/
  872. type 'STR#' {
  873.         integer = $$Countof(StringArray);
  874.         array StringArray {
  875.                 pstring;                                        /* String                */
  876.         };
  877. };
  878. /*----------------------------wctb • Window Color Lookup Table--------------------------*/
  879. type 'wctb' as 'actb';
  880. /*----------------------------WIND • Window Template------------------------------------*/
  881. type 'WIND' {
  882.         rect;                                                    /* boundsRect            */
  883.         integer         documentProc,                            /* procID                */
  884.                         dBoxProc,
  885.                         plainDBox,
  886.                         altDBoxProc,
  887.                         noGrowDocProc,
  888.                         movableDBoxProc,
  889.                         zoomDocProc = 8,
  890.                         zoomNoGrow = 12,
  891.                         rDocProc = 16;
  892.         byte            invisible, visible;                     /* visible                */
  893.         fill byte;
  894.         byte            noGoAway, goAway;                        /* goAway                */
  895.         fill byte;
  896.         unsigned hex longint;                                    /* refCon                */
  897.         pstring         Untitled = "Untitled";                    /* title                */
  898.     /*    The following are window positioning options ,usable in 7.0    */
  899. #if SystemSevenOrLater
  900.         align word;
  901.         unsigned integer                noAutoCenter = 0x0000,
  902.                                         centerMainScreen = 0x280a,
  903.                                         alertPositionMainScreen = 0x300a,
  904.                                         staggerMainScreen = 0x380a,
  905.                                         centerParentWindow = 0xa80a,
  906.                                         alertPositionParentWindow = 0xb00a,
  907.                                         staggerParentWindow = 0xb80a,
  908.                                         centerParentWindowScreen = 0x680a,
  909.                                         alertPositionParentWindowScreen = 0x700a,
  910.                                         staggerParentWindowScreen = 0x780a;
  911. #endif
  912. };
  913. /*--------------------------------------------------------------------------------------*/
  914.  
  915. /* resource containing a single rectangle */
  916.  
  917.     type 'RECT' { rect; };
  918.  
  919. /* stages for ALRT */
  920.  
  921.     #define silentStage OK, visible, silent
  922.     #define silentStages { silentStage; silentStage; silentStage; silentStage; }
  923.  
  924.     #define beepStage OK, visible, sound1
  925.     #define beepStages { beepStage; beepStage; beepStage; beepStage; }
  926.  
  927. /* RGB colors */
  928.  
  929.     #define whiteRGB $FFFF, $FFFF, $FFFF
  930.     #define blackRGB 0, 0, 0
  931.  
  932. /* colors for 'crsr' resources */
  933.  
  934.     #define transparentRGB $FFFF, $FFFF, $FFFF
  935.     #define invertRGB 0, 0, 0
  936.  
  937. /* small icons with masks */
  938.  
  939.     type 'ics#' {
  940.         array [2] {
  941.             hex string[32];
  942.         };
  943.     };
  944.     type 'kcs#' as 'ics#';                                /* Keyboard small icon <8> */
  945.  
  946. /* mini icons with masks */
  947.  
  948.     type 'icm#' {
  949.         array [2] {
  950.             hex string[24];
  951.         };
  952.     };
  953.  
  954. /* 8-bit color mini icon--no mask, no color table */
  955.  
  956.     type 'icm8' {
  957.         hex string[192];
  958.     };
  959.  
  960. /* 4-bit color mini icon--no mask, no color table */
  961.  
  962.     type 'icm4' {
  963.         hex string[96];
  964.     };
  965.  
  966. /* 8-bit color icon--no mask, no color table */
  967.  
  968.     type 'icl8' {
  969.         hex string[1024];
  970.     };
  971.     type 'kcl8' as 'icl8';                                /* Keyboard 8-bit color icon <8> */
  972.  
  973. /* 4-bit color icon--no mask, no color table */
  974.  
  975.     type 'icl4' {
  976.         hex string[512];
  977.     };
  978.     type 'kcl4' as 'icl4';                                /* Keyboard 4-bit color icon <8> */
  979.  
  980. /* 8-bit color small icon--no mask, no color table */
  981.  
  982.     type 'ics8' {
  983.         hex string[256];
  984.     };
  985.     type 'kcs8' as 'ics8';                                /* Keyboard 8-bit small color icon <8> */
  986.  
  987. /* 4-bit color small icon--no mask, no color table */
  988.  
  989.     type 'ics4' {
  990.         hex string[128];
  991.     };
  992.     type 'kcs4' as 'ics4';                                /* Keyboard 4-bit small color icon <8> */
  993.  
  994. /* a list of pixpats; Rez can’t yet handle this correctly */
  995.  
  996.     type 'ppt#' {
  997.             /* PixPat offsets (calculate them some day!?!) */
  998.             integer = $$CountOf(OffsetArray);
  999.             array OffsetArray /* [$$CountOf(PixPatArray)] */ {
  1000.                 unsigned longint /* = PixPat[$$ArrayIndex(OffsetArray)] / 8 */;
  1001.             };
  1002.  
  1003.         array PixPatArray {
  1004. PixPat:
  1005.             /* PixPat record */
  1006.             integer = 1 /* newPattern */;                            /* Pattern type            */
  1007.             unsigned longint = PixMap[$$ArrayIndex(PixPatArray)] / 8;    /* Offset to pixmap        */
  1008.             unsigned longint = PixelData[$$ArrayIndex(PixPatArray)] / 8;    /* Offset to data        */
  1009.             fill long;                                                /* Expanded pixel image    */
  1010.             fill word;                                                /* Pattern valid flag    */
  1011.             fill long;                                                /* expanded pattern        */
  1012.             hex string [8];                                            /* old-style pattern    */
  1013.  
  1014.             /* PixMap record */
  1015. PixMap:
  1016.             fill long;                                                /* Base address            */
  1017.             unsigned bitstring[1] = 1;                                /* New pixMap flag        */
  1018.             unsigned bitstring[2] = 0;                                /* Must be 0            */
  1019.             unsigned bitstring[13] = PixMapRowBytesIndexed;            /* Offset to next row    */
  1020. Bounds:        rect;                                                    /* Bitmap bounds        */
  1021.             integer = 0;                                            /* pixMap vers number    */
  1022.             integer = 0;                                            /* Packing format        */
  1023.             fill long;                                                /* Size of pixel data    */
  1024.             unsigned hex longint = $00480000;                        /* h. resolution (ppi)  */
  1025.             unsigned hex longint = $00480000;                        /* v. resolution (ppi)  */
  1026.             integer = 0 /* chunky */;                                /* Pixel storage format    */
  1027. PixelSize:
  1028.             integer;                                                /* # bits in pixel        */
  1029.             integer = 1;                                            /* # components in pixel*/
  1030.             integer = $$Word(PixelSize[$$ArrayIndex(PixPatArray)]);    /* # bits per field        */
  1031.             fill long;
  1032.             unsigned longint = ColorTable[$$ArrayIndex(PixPatArray)] / 8;
  1033.             fill long;
  1034.  
  1035. PixelData:
  1036.             hex string [PixMapRowBytesIndexed * PixMapHeightIndexed];
  1037.  
  1038. ColorTable:
  1039.             unsigned hex longint = 0;                                /* ctSeed                */
  1040.             integer = 0;                                            /* ctFlags                */
  1041.             integer = $$Countof(ColorSpec[$$ArrayIndex(PixPatArray)]) - 1;                        /* ctSize                */
  1042.             wide array ColorSpec {
  1043.                     integer = $$ArrayIndex(ColorSpec[$$ArrayIndex(PixPatArray)]) - 1;            /* value                */
  1044.                     unsigned integer;                                /* RGB:    red                */
  1045.                     unsigned integer;                                /*        green            */
  1046.                     unsigned integer;                                /*        blue            */
  1047.             };
  1048.         };
  1049.     };
  1050.  
  1051. /* types for the Database Access Manager */
  1052.  
  1053. /* 'wstr' - Word Length String Resource */
  1054. type 'wstr' {
  1055.         wstring;                                                /* string with word length spec. */
  1056. };
  1057.  
  1058. /* 'qrsc' - Query Resource */
  1059. type 'qrsc' {
  1060.         integer;                                                /* version */
  1061.  
  1062.         integer;                                                /* 'qdef' ID */
  1063.  
  1064.         integer;                                                /* STR# ID for ddevName, host,
  1065.                                                                        user, password, connstr */
  1066.  
  1067.         integer;                                                /* current query */
  1068.  
  1069.         /* array of IDs of 'wstr' resources containing queries */
  1070.         integer = $$CountOf(QueryArray);                        /* array size */
  1071.         wide array QueryArray {
  1072.             integer;                                            /* id of 'wstr' resource */
  1073.         };
  1074.  
  1075.         /* array of types and IDs for other resources for query */
  1076.         integer = $$CountOf(ResArray);                            /* array size */
  1077.         wide array ResArray {
  1078.             literal longint;                                    /* resource type */
  1079.             integer;                                            /* resource ID */
  1080.         };
  1081. };
  1082.  
  1083. /* 'dflg' - ddev Flags */
  1084. type 'dflg' {
  1085.         longint;                                                /* version */
  1086.  
  1087.         unsigned bitstring[32]                                    /* ddev flags */
  1088.             asyncNotSupp, asyncSupp;
  1089. };
  1090.  
  1091. /*--------------------------------------------------------------------------------------*/
  1092.  
  1093. #endif __TYPES_R__
  1094.  
  1095.